Integrand size = 23, antiderivative size = 133 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx=-\frac {2 b^2 d^2 n^2}{x}-2 a b e^2 n x+2 b^2 e^2 n^2 x-2 b^2 e^2 n x \log \left (c x^n\right )-\frac {2 b d^2 n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}+e^2 x \left (a+b \log \left (c x^n\right )\right )^2+\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n} \]
-2*b^2*d^2*n^2/x-2*a*b*e^2*n*x+2*b^2*e^2*n^2*x-2*b^2*e^2*n*x*ln(c*x^n)-2*b *d^2*n*(a+b*ln(c*x^n))/x-d^2*(a+b*ln(c*x^n))^2/x+e^2*x*(a+b*ln(c*x^n))^2+2 /3*d*e*(a+b*ln(c*x^n))^3/b/n
Time = 0.03 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.80 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx=-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}+e^2 x \left (a+b \log \left (c x^n\right )\right )^2+\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-2 b e^2 n x \left (a-b n+b \log \left (c x^n\right )\right )-\frac {2 b d^2 n \left (a+b n+b \log \left (c x^n\right )\right )}{x} \]
-((d^2*(a + b*Log[c*x^n])^2)/x) + e^2*x*(a + b*Log[c*x^n])^2 + (2*d*e*(a + b*Log[c*x^n])^3)/(3*b*n) - 2*b*e^2*n*x*(a - b*n + b*Log[c*x^n]) - (2*b*d^ 2*n*(a + b*n + b*Log[c*x^n]))/x
Time = 0.36 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {2795, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx\) |
\(\Big \downarrow \) 2795 |
\(\displaystyle \int \left (\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^2}+\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^2}{x}+e^2 \left (a+b \log \left (c x^n\right )\right )^2\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac {2 b d^2 n \left (a+b \log \left (c x^n\right )\right )}{x}+\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}+e^2 x \left (a+b \log \left (c x^n\right )\right )^2-2 a b e^2 n x-2 b^2 e^2 n x \log \left (c x^n\right )-\frac {2 b^2 d^2 n^2}{x}+2 b^2 e^2 n^2 x\) |
(-2*b^2*d^2*n^2)/x - 2*a*b*e^2*n*x + 2*b^2*e^2*n^2*x - 2*b^2*e^2*n*x*Log[c *x^n] - (2*b*d^2*n*(a + b*Log[c*x^n]))/x - (d^2*(a + b*Log[c*x^n])^2)/x + e^2*x*(a + b*Log[c*x^n])^2 + (2*d*e*(a + b*Log[c*x^n])^3)/(3*b*n)
3.1.88.3.1 Defintions of rubi rules used
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[ c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b , c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0 ] && IntegerQ[m] && IntegerQ[r]))
Time = 0.75 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.70
method | result | size |
parallelrisch | \(\frac {3 x^{2} \ln \left (c \,x^{n}\right )^{2} b^{2} e^{2} n -6 x^{2} \ln \left (c \,x^{n}\right ) b^{2} e^{2} n^{2}+6 x^{2} b^{2} e^{2} n^{3}+6 x^{2} \ln \left (c \,x^{n}\right ) a b \,e^{2} n -6 x^{2} a b \,e^{2} n^{2}+2 d e \,b^{2} \ln \left (c \,x^{n}\right )^{3} x +6 \ln \left (x \right ) x \,a^{2} d e n +3 x^{2} a^{2} e^{2} n +6 a d e b \ln \left (c \,x^{n}\right )^{2} x -3 \ln \left (c \,x^{n}\right )^{2} b^{2} d^{2} n -6 \ln \left (c \,x^{n}\right ) b^{2} d^{2} n^{2}-6 b^{2} d^{2} n^{3}-6 \ln \left (c \,x^{n}\right ) a b \,d^{2} n -6 a b \,d^{2} n^{2}-3 a^{2} d^{2} n}{3 x n}\) | \(226\) |
risch | \(\text {Expression too large to display}\) | \(2521\) |
1/3/x*(3*x^2*ln(c*x^n)^2*b^2*e^2*n-6*x^2*ln(c*x^n)*b^2*e^2*n^2+6*x^2*b^2*e ^2*n^3+6*x^2*ln(c*x^n)*a*b*e^2*n-6*x^2*a*b*e^2*n^2+2*d*e*b^2*ln(c*x^n)^3*x +6*ln(x)*x*a^2*d*e*n+3*x^2*a^2*e^2*n+6*a*d*e*b*ln(c*x^n)^2*x-3*ln(c*x^n)^2 *b^2*d^2*n-6*ln(c*x^n)*b^2*d^2*n^2-6*b^2*d^2*n^3-6*ln(c*x^n)*a*b*d^2*n-6*a *b*d^2*n^2-3*a^2*d^2*n)/n
Leaf count of result is larger than twice the leaf count of optimal. 291 vs. \(2 (131) = 262\).
Time = 0.29 (sec) , antiderivative size = 291, normalized size of antiderivative = 2.19 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx=\frac {2 \, b^{2} d e n^{2} x \log \left (x\right )^{3} - 6 \, b^{2} d^{2} n^{2} - 6 \, a b d^{2} n - 3 \, a^{2} d^{2} + 3 \, {\left (2 \, b^{2} e^{2} n^{2} - 2 \, a b e^{2} n + a^{2} e^{2}\right )} x^{2} + 3 \, {\left (b^{2} e^{2} x^{2} - b^{2} d^{2}\right )} \log \left (c\right )^{2} + 3 \, {\left (b^{2} e^{2} n^{2} x^{2} + 2 \, b^{2} d e n x \log \left (c\right ) - b^{2} d^{2} n^{2} + 2 \, a b d e n x\right )} \log \left (x\right )^{2} - 6 \, {\left (b^{2} d^{2} n + a b d^{2} + {\left (b^{2} e^{2} n - a b e^{2}\right )} x^{2}\right )} \log \left (c\right ) + 6 \, {\left (b^{2} d e x \log \left (c\right )^{2} - b^{2} d^{2} n^{2} - a b d^{2} n + a^{2} d e x - {\left (b^{2} e^{2} n^{2} - a b e^{2} n\right )} x^{2} + {\left (b^{2} e^{2} n x^{2} - b^{2} d^{2} n + 2 \, a b d e x\right )} \log \left (c\right )\right )} \log \left (x\right )}{3 \, x} \]
1/3*(2*b^2*d*e*n^2*x*log(x)^3 - 6*b^2*d^2*n^2 - 6*a*b*d^2*n - 3*a^2*d^2 + 3*(2*b^2*e^2*n^2 - 2*a*b*e^2*n + a^2*e^2)*x^2 + 3*(b^2*e^2*x^2 - b^2*d^2)* log(c)^2 + 3*(b^2*e^2*n^2*x^2 + 2*b^2*d*e*n*x*log(c) - b^2*d^2*n^2 + 2*a*b *d*e*n*x)*log(x)^2 - 6*(b^2*d^2*n + a*b*d^2 + (b^2*e^2*n - a*b*e^2)*x^2)*l og(c) + 6*(b^2*d*e*x*log(c)^2 - b^2*d^2*n^2 - a*b*d^2*n + a^2*d*e*x - (b^2 *e^2*n^2 - a*b*e^2*n)*x^2 + (b^2*e^2*n*x^2 - b^2*d^2*n + 2*a*b*d*e*x)*log( c))*log(x))/x
Time = 0.43 (sec) , antiderivative size = 255, normalized size of antiderivative = 1.92 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx=\begin {cases} - \frac {a^{2} d^{2}}{x} + \frac {2 a^{2} d e \log {\left (c x^{n} \right )}}{n} + a^{2} e^{2} x - \frac {2 a b d^{2} n}{x} - \frac {2 a b d^{2} \log {\left (c x^{n} \right )}}{x} + \frac {2 a b d e \log {\left (c x^{n} \right )}^{2}}{n} - 2 a b e^{2} n x + 2 a b e^{2} x \log {\left (c x^{n} \right )} - \frac {2 b^{2} d^{2} n^{2}}{x} - \frac {2 b^{2} d^{2} n \log {\left (c x^{n} \right )}}{x} - \frac {b^{2} d^{2} \log {\left (c x^{n} \right )}^{2}}{x} + \frac {2 b^{2} d e \log {\left (c x^{n} \right )}^{3}}{3 n} + 2 b^{2} e^{2} n^{2} x - 2 b^{2} e^{2} n x \log {\left (c x^{n} \right )} + b^{2} e^{2} x \log {\left (c x^{n} \right )}^{2} & \text {for}\: n \neq 0 \\\left (a + b \log {\left (c \right )}\right )^{2} \left (- \frac {d^{2}}{x} + 2 d e \log {\left (x \right )} + e^{2} x\right ) & \text {otherwise} \end {cases} \]
Piecewise((-a**2*d**2/x + 2*a**2*d*e*log(c*x**n)/n + a**2*e**2*x - 2*a*b*d **2*n/x - 2*a*b*d**2*log(c*x**n)/x + 2*a*b*d*e*log(c*x**n)**2/n - 2*a*b*e* *2*n*x + 2*a*b*e**2*x*log(c*x**n) - 2*b**2*d**2*n**2/x - 2*b**2*d**2*n*log (c*x**n)/x - b**2*d**2*log(c*x**n)**2/x + 2*b**2*d*e*log(c*x**n)**3/(3*n) + 2*b**2*e**2*n**2*x - 2*b**2*e**2*n*x*log(c*x**n) + b**2*e**2*x*log(c*x** n)**2, Ne(n, 0)), ((a + b*log(c))**2*(-d**2/x + 2*d*e*log(x) + e**2*x), Tr ue))
Time = 0.20 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.50 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx=b^{2} e^{2} x \log \left (c x^{n}\right )^{2} - 2 \, a b e^{2} n x + 2 \, a b e^{2} x \log \left (c x^{n}\right ) + \frac {2 \, b^{2} d e \log \left (c x^{n}\right )^{3}}{3 \, n} + 2 \, {\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} b^{2} e^{2} - 2 \, b^{2} d^{2} {\left (\frac {n^{2}}{x} + \frac {n \log \left (c x^{n}\right )}{x}\right )} + a^{2} e^{2} x + \frac {2 \, a b d e \log \left (c x^{n}\right )^{2}}{n} - \frac {b^{2} d^{2} \log \left (c x^{n}\right )^{2}}{x} + 2 \, a^{2} d e \log \left (x\right ) - \frac {2 \, a b d^{2} n}{x} - \frac {2 \, a b d^{2} \log \left (c x^{n}\right )}{x} - \frac {a^{2} d^{2}}{x} \]
b^2*e^2*x*log(c*x^n)^2 - 2*a*b*e^2*n*x + 2*a*b*e^2*x*log(c*x^n) + 2/3*b^2* d*e*log(c*x^n)^3/n + 2*(n^2*x - n*x*log(c*x^n))*b^2*e^2 - 2*b^2*d^2*(n^2/x + n*log(c*x^n)/x) + a^2*e^2*x + 2*a*b*d*e*log(c*x^n)^2/n - b^2*d^2*log(c* x^n)^2/x + 2*a^2*d*e*log(x) - 2*a*b*d^2*n/x - 2*a*b*d^2*log(c*x^n)/x - a^2 *d^2/x
Leaf count of result is larger than twice the leaf count of optimal. 274 vs. \(2 (131) = 262\).
Time = 0.36 (sec) , antiderivative size = 274, normalized size of antiderivative = 2.06 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx=\frac {2}{3} \, b^{2} d e n^{2} \log \left (x\right )^{3} + 2 \, b^{2} d e n \log \left (c\right ) \log \left (x\right )^{2} + {\left (x \log \left (x\right )^{2} - 2 \, x \log \left (x\right ) + 2 \, x\right )} b^{2} e^{2} n^{2} - b^{2} d^{2} n^{2} {\left (\frac {\log \left (x\right )^{2}}{x} + \frac {2 \, \log \left (x\right )}{x} + \frac {2}{x}\right )} + 2 \, {\left (x \log \left (x\right ) - x\right )} b^{2} e^{2} n \log \left (c\right ) - 2 \, b^{2} d^{2} n {\left (\frac {\log \left (x\right )}{x} + \frac {1}{x}\right )} \log \left (c\right ) + b^{2} e^{2} x \log \left (c\right )^{2} + 2 \, a b d e n \log \left (x\right )^{2} + 2 \, b^{2} d e \log \left (c\right )^{2} \log \left ({\left | x \right |}\right ) + 2 \, {\left (x \log \left (x\right ) - x\right )} a b e^{2} n - 2 \, a b d^{2} n {\left (\frac {\log \left (x\right )}{x} + \frac {1}{x}\right )} + 2 \, a b e^{2} x \log \left (c\right ) + 4 \, a b d e \log \left (c\right ) \log \left ({\left | x \right |}\right ) + a^{2} e^{2} x - \frac {b^{2} d^{2} \log \left (c\right )^{2}}{x} + 2 \, a^{2} d e \log \left ({\left | x \right |}\right ) - \frac {2 \, a b d^{2} \log \left (c\right )}{x} - \frac {a^{2} d^{2}}{x} \]
2/3*b^2*d*e*n^2*log(x)^3 + 2*b^2*d*e*n*log(c)*log(x)^2 + (x*log(x)^2 - 2*x *log(x) + 2*x)*b^2*e^2*n^2 - b^2*d^2*n^2*(log(x)^2/x + 2*log(x)/x + 2/x) + 2*(x*log(x) - x)*b^2*e^2*n*log(c) - 2*b^2*d^2*n*(log(x)/x + 1/x)*log(c) + b^2*e^2*x*log(c)^2 + 2*a*b*d*e*n*log(x)^2 + 2*b^2*d*e*log(c)^2*log(abs(x) ) + 2*(x*log(x) - x)*a*b*e^2*n - 2*a*b*d^2*n*(log(x)/x + 1/x) + 2*a*b*e^2* x*log(c) + 4*a*b*d*e*log(c)*log(abs(x)) + a^2*e^2*x - b^2*d^2*log(c)^2/x + 2*a^2*d*e*log(abs(x)) - 2*a*b*d^2*log(c)/x - a^2*d^2/x
Time = 0.49 (sec) , antiderivative size = 228, normalized size of antiderivative = 1.71 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx=\ln \left (x\right )\,\left (2\,d\,e\,a^2+4\,d\,e\,a\,b\,n+4\,d\,e\,b^2\,n^2\right )-\frac {a^2\,d^2+2\,a\,b\,d^2\,n+2\,b^2\,d^2\,n^2}{x}-\ln \left (c\,x^n\right )\,\left (\frac {2\,b\,\left (a+b\,n\right )\,d^2+4\,b\,\left (a+b\,n\right )\,d\,e\,x+2\,b\,\left (a-b\,n\right )\,e^2\,x^2}{x}-4\,b\,e^2\,x\,\left (a-b\,n\right )\right )+{\ln \left (c\,x^n\right )}^2\,\left (2\,b^2\,e^2\,x-\frac {b^2\,d^2+2\,b^2\,d\,e\,x+b^2\,e^2\,x^2}{x}+\frac {2\,b\,d\,e\,\left (a+b\,n\right )}{n}\right )+e^2\,x\,\left (a^2-2\,a\,b\,n+2\,b^2\,n^2\right )+\frac {2\,b^2\,d\,e\,{\ln \left (c\,x^n\right )}^3}{3\,n} \]
log(x)*(2*a^2*d*e + 4*b^2*d*e*n^2 + 4*a*b*d*e*n) - (a^2*d^2 + 2*b^2*d^2*n^ 2 + 2*a*b*d^2*n)/x - log(c*x^n)*((2*b*d^2*(a + b*n) + 2*b*e^2*x^2*(a - b*n ) + 4*b*d*e*x*(a + b*n))/x - 4*b*e^2*x*(a - b*n)) + log(c*x^n)^2*(2*b^2*e^ 2*x - (b^2*d^2 + b^2*e^2*x^2 + 2*b^2*d*e*x)/x + (2*b*d*e*(a + b*n))/n) + e ^2*x*(a^2 + 2*b^2*n^2 - 2*a*b*n) + (2*b^2*d*e*log(c*x^n)^3)/(3*n)